
package com.itheima.static_case.Demo6;


public class Animal {
    public String name;

    public Animal() {
    }

    public Animal(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void print() {
        System.out.println("这是: " + this.getName());
    }
}
